package com.young.shop.pojo.entity;


import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@ApiModel(value = "订单对象")
public class Order implements Serializable {
    private Long oid;
    @ApiModelProperty(value = "用户id")
    private Long id;
    @ApiModelProperty(value = "订单状态")
    private Integer status;
    @ApiModelProperty(value = "订单数量")
    private Integer quantity;
    @ApiModelProperty(value = "创建时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;
    @ApiModelProperty(value = "发货时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date deliveryDate;
    @ApiModelProperty(value = "取消时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date cancelDate;
    @ApiModelProperty(value = "收获时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date receiveDate;
    @ApiModelProperty(value = "商品价格")
    private double price;
    @ApiModelProperty(value = "商品名称")
    private String userName;

    //订单拥有的商品列表
    private List<Goods> goodsList;

    private BigDecimal orderPrice;

    @Override
    public String toString() {
        return "Order{" +
                "oid=" + oid +
                ", id=" + id +
                ", status=" + status +
                ", quantity=" + quantity +
                ", createDate=" + createDate +
                ", deliveryDate=" + deliveryDate +
                ", cancelDate=" + cancelDate +
                ", receiveDate=" + receiveDate +
                ", orderPrice=" + orderPrice +
                '}';
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }


    public Long getOid() {
        return oid;
    }

    public void setOid(Long oid) {
        this.oid = oid;
    }

    public BigDecimal getOrderPrice() {
        return orderPrice;
    }

    public void setOrderPrice(BigDecimal orderPrice) {
        this.orderPrice = orderPrice;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getDeliveryDate() {
        return deliveryDate;
    }

    public void setDeliveryDate(Date deliveryDate) {
        this.deliveryDate = deliveryDate;
    }

    public Date getCancelDate() {
        return cancelDate;
    }

    public void setCancelDate(Date cancelDate) {
        this.cancelDate = cancelDate;
    }

    public Date getReceiveDate() {
        return receiveDate;
    }

    public void setReceiveDate(Date receiveDate) {
        this.receiveDate = receiveDate;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public List<Goods> getGoodsList() {
        return goodsList;
    }

    public void setGoodsList(List<Goods> goodsList) {
        this.goodsList = goodsList;
    }
}
